home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 March / Pc Users extra 6.iso / pshare95 / prog / formula1 / vcform1.z / format1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-19  |  8.1 KB  |  265 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Cell Formatting Example"
  4.    ClientHeight    =   5310
  5.    ClientLeft      =   1185
  6.    ClientTop       =   1470
  7.    ClientWidth     =   7575
  8.    Height          =   5715
  9.    Icon            =   "format1.frx":0000
  10.    Left            =   1125
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5310
  13.    ScaleWidth      =   7575
  14.    Top             =   1125
  15.    Width           =   7695
  16.    Begin VB.CommandButton cmdFormat 
  17.       Caption         =   "3D Effects 2"
  18.       Height          =   375
  19.       Index           =   15
  20.       Left            =   5940
  21.       TabIndex        =   16
  22.       Top             =   4020
  23.       Width           =   1215
  24.    End
  25.    Begin VB.CommandButton cmdFormat 
  26.       Caption         =   "3D Effects 1"
  27.       Height          =   375
  28.       Index           =   14
  29.       Left            =   5940
  30.       TabIndex        =   15
  31.       Top             =   3660
  32.       Width           =   1215
  33.    End
  34.    Begin VB.CommandButton cmdFormat 
  35.       Caption         =   "List 3"
  36.       Height          =   375
  37.       Index           =   13
  38.       Left            =   4560
  39.       TabIndex        =   14
  40.       Top             =   4380
  41.       Width           =   1215
  42.    End
  43.    Begin VB.CommandButton cmdFormat 
  44.       Caption         =   "List 2"
  45.       Height          =   375
  46.       Index           =   12
  47.       Left            =   4560
  48.       TabIndex        =   13
  49.       Top             =   4020
  50.       Width           =   1215
  51.    End
  52.    Begin VB.CommandButton cmdFormat 
  53.       Caption         =   "List 1"
  54.       Height          =   375
  55.       Index           =   11
  56.       Left            =   4560
  57.       TabIndex        =   12
  58.       Top             =   3660
  59.       Width           =   1215
  60.    End
  61.    Begin VB.CommandButton cmdFormat 
  62.       Caption         =   "Colorful 4"
  63.       Height          =   375
  64.       Index           =   10
  65.       Left            =   3180
  66.       TabIndex        =   11
  67.       Top             =   4740
  68.       Width           =   1215
  69.    End
  70.    Begin VB.CommandButton cmdFormat 
  71.       Caption         =   "Colorful 3"
  72.       Height          =   375
  73.       Index           =   9
  74.       Left            =   3180
  75.       TabIndex        =   10
  76.       Top             =   4380
  77.       Width           =   1215
  78.    End
  79.    Begin VB.CommandButton cmdFormat 
  80.       Caption         =   "Colorful 2"
  81.       Height          =   375
  82.       Index           =   8
  83.       Left            =   3180
  84.       TabIndex        =   9
  85.       Top             =   4020
  86.       Width           =   1215
  87.    End
  88.    Begin VB.CommandButton cmdFormat 
  89.       Caption         =   "Colorful 1"
  90.       Height          =   375
  91.       Index           =   7
  92.       Left            =   3180
  93.       TabIndex        =   8
  94.       Top             =   3660
  95.       Width           =   1215
  96.    End
  97.    Begin VB.CommandButton cmdFormat 
  98.       Caption         =   "Accounting 3"
  99.       Height          =   375
  100.       Index           =   6
  101.       Left            =   1800
  102.       TabIndex        =   7
  103.       Top             =   4380
  104.       Width           =   1215
  105.    End
  106.    Begin VB.CommandButton cmdFormat 
  107.       Caption         =   "Accounting 2"
  108.       Height          =   375
  109.       Index           =   5
  110.       Left            =   1800
  111.       TabIndex        =   6
  112.       Top             =   4020
  113.       Width           =   1215
  114.    End
  115.    Begin VB.CommandButton cmdFormat 
  116.       Caption         =   "Accounting 1"
  117.       Height          =   375
  118.       Index           =   4
  119.       Left            =   1800
  120.       TabIndex        =   5
  121.       Top             =   3660
  122.       Width           =   1215
  123.    End
  124.    Begin VB.CommandButton cmdFormat 
  125.       Caption         =   "Classic 3"
  126.       Height          =   375
  127.       Index           =   3
  128.       Left            =   420
  129.       TabIndex        =   4
  130.       Top             =   4740
  131.       Width           =   1215
  132.    End
  133.    Begin VB.CommandButton cmdFormat 
  134.       Caption         =   "Classic 2"
  135.       Height          =   375
  136.       Index           =   2
  137.       Left            =   420
  138.       TabIndex        =   3
  139.       Top             =   4380
  140.       Width           =   1215
  141.    End
  142.    Begin VB.CommandButton cmdFormat 
  143.       Caption         =   "Classic 1"
  144.       Height          =   375
  145.       Index           =   1
  146.       Left            =   420
  147.       TabIndex        =   2
  148.       Top             =   4020
  149.       Width           =   1215
  150.    End
  151.    Begin VB.CommandButton cmdFormat 
  152.       Caption         =   "Simple"
  153.       Height          =   375
  154.       Index           =   0
  155.       Left            =   420
  156.       TabIndex        =   1
  157.       Top             =   3660
  158.       Width           =   1215
  159.    End
  160.    Begin VCF150Ctl.F1Book F1Book1 
  161.       Height          =   2475
  162.       Left            =   240
  163.       TabIndex        =   17
  164.       Top             =   1020
  165.       Width           =   6975
  166.       _ExtentX        =   12303
  167.       _ExtentY        =   4366
  168.       _0              =   $"format1.frx":044A
  169.       _1              =   $"format1.frx":084F
  170.       _2              =   $"format1.frx":0C54
  171.       _3              =   $"format1.frx":1059
  172.       _4              =   $"format1.frx":145E
  173.       _count          =   5
  174.       _ver            =   1
  175.    End
  176.    Begin VB.Label Label1 
  177.       Caption         =   $"format1.frx":15A7
  178.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  179.          Name            =   "Arial"
  180.          Size            =   9.75
  181.          Charset         =   0
  182.          Weight          =   400
  183.          Underline       =   0   'False
  184.          Italic          =   0   'False
  185.          Strikethrough   =   0   'False
  186.       EndProperty
  187.       Height          =   735
  188.       Left            =   240
  189.       TabIndex        =   0
  190.       Top             =   60
  191.       Width           =   7035
  192.       WordWrap        =   -1  'True
  193.    End
  194. Attribute VB_Name = "Form1"
  195. Attribute VB_Creatable = False
  196. Attribute VB_Exposed = False
  197. Option Explicit
  198. Private Sub cmdFormat_Click(Index As Integer)
  199.    With F1Book1
  200.       '' To make this work with any selection you will want to enable
  201.       '' selections, scrollbars, and remove the following 2 lines.
  202.       '' Then this example will work with the active selection. You
  203.       '' should do some error checking to ensure the selection is
  204.       '' proper - contains all required Ranges according to the
  205.       '' Cell_Formatting Module instructions.
  206.       .SetSelection 2, 2, 8, 6
  207.       .BackColor = .PaletteEntry(2)
  208.       '' All functions below preserve the initial seleciton
  209.       Select Case Index
  210.          Case 0:     ' Simple
  211.             Call FormatCells(F1Book1, SIMPLE)
  212.             
  213.          Case 1:     ' Classic 1
  214.             Call FormatCells(F1Book1, CLASSIC1)
  215.             
  216.          Case 2:     ' Classic 2
  217.             Call FormatCells(F1Book1, CLASSIC2)
  218.          Case 3:     ' Classic 3
  219.             Call FormatCells(F1Book1, CLASSIC3)
  220.             
  221.          Case 4:
  222.             Call FormatCells(F1Book1, ACCOUNTING1)
  223.          
  224.          Case 5:
  225.             Call FormatCells(F1Book1, ACCOUNTING2)
  226.          
  227.          Case 6:
  228.             Call FormatCells(F1Book1, ACCOUNTING3)
  229.          
  230.          Case 7:    ' Colorful 1
  231.             Call FormatCells(F1Book1, COLORFUL1)
  232.             
  233.          Case 8:     ' Colorful 2
  234.             Call FormatCells(F1Book1, COLORFUL2)
  235.          
  236.          Case 9:    ' Colorful 3
  237.             Call FormatCells(F1Book1, COLORFUL3)
  238.          
  239.          Case 10:    ' Colorful 4
  240.             Call FormatCells(F1Book1, COLORFUL4)
  241.          
  242.          Case 11:    ' List 1
  243.             Call FormatCells(F1Book1, LIST1)
  244.          
  245.          Case 12:    ' List 2
  246.             Call FormatCells(F1Book1, LIST2)
  247.          
  248.          Case 13:    ' List 3
  249.             Call FormatCells(F1Book1, LIST3)
  250.             
  251.          Case 14:    ' 3D Effects 1
  252.             Call FormatCells(F1Book1, EFFECTS3D1)
  253.             
  254.          Case 15:    ' 3D Effects 2
  255.             Call FormatCells(F1Book1, EFFECTS3D2)
  256.       
  257.       End Select
  258.       
  259.    End With
  260.             
  261. End Sub
  262. Private Sub Form_Load()
  263. F1Book1.ReadEx ("f1book1.vts")
  264. End Sub
  265.